package org.jeecg.modules.demo.soSaleOrder.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jetbrains.annotations.NotNull;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: so_sale_order
 * @Author: jeecg-boot
 * @Date:   2021-12-13
 * @Version: V1.0
 */
@Data
@TableName("so_sale_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="so_sale_order对象", description="so_sale_order")
public class SoSaleOrder implements Serializable,Comparable<SoSaleOrder> {
    private static final long serialVersionUID = 1L;

	/**订单状态（0：未审，1：已审，2：已关闭）*/
	@Excel(name = "订单状态（0：未审，1：已审，2：已关闭）", width = 15)
    @ApiModelProperty(value = "订单状态（0：未审，1：已审，2：已关闭）")
    @Dict(dicCode= "checkState")
    private Integer soStatus;
	/**出库单号*/
	@Excel(name = "出库单号", width = 15)
    @ApiModelProperty(value = "出库单号")
    private String sodNo;
	/**删除状态（0：未删，1：已删）*/
	@Excel(name = "删除状态（0：未删，1：已删）", width = 15)
    @ApiModelProperty(value = "删除状态（0：未删，1：已删）")
    private Integer isDelete;
	/**是否已生成出库单（0：否，1：是）*/
	@Excel(name = "是否已生成出库单（0：否，1：是）", width = 15)
    @ApiModelProperty(value = "是否已生成出库单（0：否，1：是）")
    private Integer isQuality;
	/**客户*/
	@Excel(name = "客户", width = 15)
    @ApiModelProperty(value = "客户")
    private String soCustom;
	/**运输方式*/
	@Excel(name = "运输方式", width = 15)
    @Dict(dicCode = "yunshufs")
    @ApiModelProperty(value = "运输方式")
    private String ysType;
	/**含税单价*/
	@Excel(name = "含税单价", width = 15)
    @ApiModelProperty(value = "含税单价")
    private BigDecimal hsdj;
	/**含税金额*/
	@Excel(name = "含税金额", width = 15)
    @ApiModelProperty(value = "含税金额")
    private BigDecimal hsje;
//	/**合同号*/
//	@Excel(name = "合同号", width = 15)
//    @ApiModelProperty(value = "合同号")
//    private String hth;
	/**项目*/
	@Excel(name = "项目", width = 15)
    @ApiModelProperty(value = "项目")
    @Dict(dictTable = "pj_project",dicCode ="id",dicText="pj_name")
    private String project;
	/**无税单价*/
	@Excel(name = "无税单价", width = 15)
    @ApiModelProperty(value = "无税单价")
    private BigDecimal wsdj;
	/**无税金额*/
	@Excel(name = "无税金额", width = 15)
    @ApiModelProperty(value = "无税金额")
    private BigDecimal wsje;
	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
	/**销售订单号*/
	@Excel(name = "销售订单号", width = 15)
    @ApiModelProperty(value = "销售订单号")
    private String soOrder;
	/**合同编号*/
	@Excel(name = "合同编号", width = 15)
    @ApiModelProperty(value = "合同编号")
    private String soConNo;
	/**职工号*/
	@Excel(name = "职工号", width = 15)
    @ApiModelProperty(value = "职工号")
    private String staffNo;
	/**发货日期*/
	@Excel(name = "发货日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "发货日期")
    private Date soDate;
	/**截止日期*/
	@Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "截止日期")
    private Date soEnddate;
	/**业务员*/
	@Excel(name = "业务员", width = 15)
    @ApiModelProperty(value = "业务员")
    @Dict(dictTable = "sys_user",dicCode ="id",dicText="realname")
    private String soStaff;
	/**订单总量*/
	@Excel(name = "订单总量", width = 15)
    @ApiModelProperty(value = "订单总量")
    private BigDecimal soTotail;
	/**最小量*/
	@Excel(name = "最小量", width = 15)
    @ApiModelProperty(value = "最小量")
    private Double soMin;
	/**最大量*/
	@Excel(name = "最大量", width = 15)
    @ApiModelProperty(value = "最大量")
    private Double soMax;
	/**订单创建时间*/
	@Excel(name = "订单创建时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "订单创建时间")
    private Date soCreateDate;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**存货名称*/
    @Excel(name = "存货名称", width = 15)
    @ApiModelProperty(value = "存货名称")
    private String prdNo;
    /**指标*/
    @Excel(name = "指标", width = 15)
    @ApiModelProperty(value = "指标")
    private String target;
    /**单位*/
    @Excel(name = "单位", width = 15)
    @ApiModelProperty(value = "单位")
    private String jldw;
    /**单位*/
    @Excel(name = "单位", width = 15)
    @ApiModelProperty(value = "单位")
    private String danwei;
    /**部门*/
    @Excel(name = "部门", width = 15)
    @ApiModelProperty(value = "部门")
    @Dict(dictTable = "sys_depart",dicCode ="id",dicText="depart_name")
    private String dept;
    /**税率*/
    @Excel(name = "税率", width = 15)
    @ApiModelProperty(value = "税率")
    @Dict(dicCode = "tax_rate")
    private Integer sl;
    /**业务类型*/
    @Excel(name = "业务类型", width = 15)
    @ApiModelProperty(value = "业务类型")
    @Dict(dicCode = "soorder_type")
    private String ywType;
    /**累计出库量*/
    @Excel(name = "累计出库量", width = 15)
    @ApiModelProperty(value = "累计出库量")
    private BigDecimal soLjck;
    /**可出库数量*/
    @Excel(name = "可出库数量", width = 15)
    @ApiModelProperty(value = "可出库数量")
    private BigDecimal soKck;
    /**审核人*/
    @Excel(name = "审核人", width = 15)
    @ApiModelProperty(value = "审核人")
    @Dict(dictTable = "sys_user",dicCode ="id",dicText="realname")
    private String shName;
    /**审核时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Excel(name = "审核时间", width = 15, format = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date shTime;
    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**指标json*/
    @Excel(name = "指标json", width = 15)
    @ApiModelProperty(value = "指标json")
    private String targetJson;
    /**税额*/
    @Excel(name = "税额", width = 15)
    @ApiModelProperty(value = "税额")
    private BigDecimal psTax;
    /**开票金额*/
    @Excel(name = "开票金额", width = 15)
    @ApiModelProperty(value = "开票金额")
    private BigDecimal kpJine;
    /**预收款金额*/
    @Excel(name = "预收款金额", width = 15)
    @ApiModelProperty(value = "预收款金额")
    private BigDecimal yskJine;
    /**发站*/
    @Excel(name = "发站", width = 15)
    @ApiModelProperty(value = "发站")
    private String fazbm;
    /**到站*/
    @Excel(name = "到站", width = 15)
    @ApiModelProperty(value = "到站")
    private String daozbm;
    /**是否预开票（0：否，1：是）*/
    @Excel(name = "是否预开票（0：否，1：是）", width = 15)
    @ApiModelProperty(value = "是否预开票（null：否，1：是）")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer isYkp;
    /**附件*/
    @Excel(name = "附件", width = 15)
    @ApiModelProperty(value = "附件")
    private String fj;
    /**租户id*/
    @Excel(name = "租户id", width = 15)
    @ApiModelProperty(value = "租户id")
    private Integer tenantId;
    /**开票数量*/
    @Excel(name = "开票数量", width = 15)
    @ApiModelProperty(value = "开票数量")
    private BigDecimal kpNum;
    /**剩余可结算的数量开票*/
    @Excel(name = "剩余可结算的数量开票", width = 15)
    @ApiModelProperty(value = "剩余可结算的数量开票")
    private BigDecimal kjskpNum;
    /**剩余可结算金额(预结算单专用)*/
    @Excel(name = "剩余可结算金额", width = 15)
    @ApiModelProperty(value = "剩余可结算金额")
    private BigDecimal kjsJine;
    /**内部编号*/
    @Excel(name = "内部编号", width = 15)
    @ApiModelProperty(value = "内部编号")
    private String tradecode;
    /**期初类型*/
    @Excel(name = "期初类型", width = 15)
    @ApiModelProperty(value = "期初类型")
    @Dict(dicCode = "odlx")
    private String qcType;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**机构编码*/
    @ApiModelProperty(value = "机构编码")
    private String sysOrgCode;



    @Override
    public int compareTo(@NotNull SoSaleOrder o) {
        return o.getCreateTime().compareTo(this.createTime);
    }
}
